package com.harmontronics.hanma.paas.paas.domain.tenant.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.harmontronics.hanma.paas.paas.domain.tenant.entity.TenantAppTree;
import com.harmontronics.hanma.paas.paas.domain.tenant.repository.po.HmTenantAppPO;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 租户-应用表
 * 
 * @author cms-generator
 * @email cms-generator@harmontronics.com
 * @date 2021-03-12 10:21:19
 */
@Mapper
public interface HmTenantAppMapper extends BaseMapper<HmTenantAppPO> {

    List<TenantAppTree> getAllApp(@Param("currentTenantId") Long currentTenantId,
            @Param("currentUserId") Long currentUserId,@Param("deleted") int deleted);

    List<TenantAppTree> getAppByTenantUserId(@Param("currentTenantId") Long currentTenantId,
            @Param("currentUserId") Long currentUserId,@Param("deleted") int deleted);

    IPage<HmTenantAppPO> selectAppListPage(Page page,@Param("appName") String appName,
            @Param("tenantName") String tenantName,@Param("startTime") String startTime,
            @Param("endTime") String endTime,@Param("deleted") int deleted,
            @Param("released") int released);

    IPage<HmTenantAppPO> selectAppBinListPage(Page page,@Param("appName") String appName,
            @Param("currentUserId") Long currentUserId);
}
